home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / InstrWindow.h < prev    next >
Text File  |  1994-07-17  |  3KB  |  88 lines

  1. /* InstrWindow.h */
  2.  
  3. #ifndef Included_InstrWindow_h
  4. #define Included_InstrWindow_h
  5.  
  6. /* InstrWindow module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* InstrObject */
  14. /* MainWindowStuff */
  15. /* InstrList */
  16. /* TextEdit */
  17. /* WindowDispatcher */
  18. /* Memory */
  19. /* GrowIcon */
  20. /* Main */
  21. /* FindDialog */
  22. /* DataMunging */
  23. /* GlobalWindowMenuList */
  24.  
  25. #include "Screen.h"
  26. #include "EventLoop.h"
  27.  
  28. struct InstrWindowRec;
  29. typedef struct InstrWindowRec InstrWindowRec;
  30.  
  31. /* forward declarations */
  32. struct InstrObjectRec;
  33. struct MainWindowRec;
  34. struct InstrListRec;
  35. struct MenuItemType;
  36.  
  37. /* create a new instrument specification editing window */
  38. InstrWindowRec*            NewInstrWindow(struct InstrObjectRec* InstrObj,
  39.                                             struct MainWindowRec* MainWindow,
  40.                                             struct InstrListRec* InstrList, short WinX, short WinY,
  41.                                             short WinWidth, short WinHeight);
  42.  
  43. /* write back modified data and dispose of the instrument window */
  44. void                                DisposeInstrWindow(InstrWindowRec* Window);
  45.  
  46. /* bring the window to the top and give it the focus */
  47. void                                BringInstrWindowToFront(InstrWindowRec* Window);
  48.  
  49. /* returns True if the data has been modified since the last file save. */
  50. MyBoolean                        HasInstrWindowBeenModified(InstrWindowRec* Window);
  51.  
  52. /* highlight the line in the instrument specification edit */
  53. void                                InstrWindowHilightLine(InstrWindowRec* Window, long LineNumber);
  54.  
  55. /* event handling routines */
  56. void                                InstrWindowDoIdle(InstrWindowRec* Window, MyBoolean CheckCursorFlag,
  57.                                             OrdType XLoc, OrdType YLoc, ModifierFlags Modifiers);
  58. void                                InstrWindowBecomeActive(InstrWindowRec* Window);
  59. void                                InstrWindowBecomeInactive(InstrWindowRec* Window);
  60. void                                InstrWindowResized(InstrWindowRec* Window);
  61. void                                InstrWindowDoMouseDown(OrdType XLoc, OrdType YLoc,
  62.                                             ModifierFlags Modifiers, InstrWindowRec* Window);
  63. void                                InstrWindowDoKeyDown(unsigned char KeyCode,
  64.                                             ModifierFlags Modifiers, InstrWindowRec* Window);
  65. void                                InstrWindowClose(InstrWindowRec* Window);
  66. void                                InstrWindowMenuSetup(InstrWindowRec* Window);
  67. void                                InstrWindowDoMenuCommand(InstrWindowRec* Window,
  68.                                             struct MenuItemType* MenuItem);
  69. void                                InstrWindowUpdate(InstrWindowRec* Window);
  70.  
  71. /* get a copy of the instrument name */
  72. char*                                InstrWindowGetNameCopy(InstrWindowRec* Window);
  73.  
  74. /* get a copy of the instrument definition text */
  75. char*                                InstrWindowGetDefinitionCopy(InstrWindowRec* Window);
  76.  
  77. /* the filename has changed, so update the window title bar.  NewFilename is a */
  78. /* non-null-terminated string which must be disposed by the caller. */
  79. void                                InstrWindowGlobalNameChange(InstrWindowRec* Window, char* NewFilename);
  80.  
  81. /* update the title bar of the window even if the filename hasn't changed */
  82. void                                InstrWindowResetTitlebar(InstrWindowRec* Window);
  83.  
  84. /* write back all modified data to the instrument object */
  85. MyBoolean                        InstrWindowWritebackModifiedData(InstrWindowRec* Window);
  86.  
  87. #endif
  88.